package start.invoice;

import java.math.BigDecimal;

/**
 * 发票明细项目模型
 * 存储商品或服务的详细信息
 */
public class InvoiceItem {
    private String name;           // 名称
    private String model;          // 规格型号
    private String unit;           // 单位
    private BigDecimal quantity;   // 数量
    private BigDecimal unitPrice;  // 单价
    private BigDecimal amount;     // 金额
    private String taxRate;        // 税率
    private BigDecimal taxAmount;  // 税额

    // 构造函数
    public InvoiceItem(String name, String model, String unit, BigDecimal quantity,
                       BigDecimal unitPrice, BigDecimal amount, String taxRate, BigDecimal taxAmount) {
        this.name = name;
        this.model = model;
        this.unit = unit;
        this.quantity = quantity;
        this.unitPrice = unitPrice;
        this.amount = amount;
        this.taxRate = taxRate;
        this.taxAmount = taxAmount;
    }

    // Getters and Setters
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(String taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }
}
